package pack2;

import java.util.Scanner;
public class java14 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int arry[][] = new int[n][n];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                arry[i][j] = sc.nextInt();
            }
        }
        int sum=0;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if((i+j)==(n-1)||i==(n-1)||j==(n-1))
                    continue;
              sum+=arry[i][j];
            }
        }
        System.out.println(sum);
    }
}
